<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <h:outputStylesheet name="css/cssLayout.css"/>
        <title>Booking Ticket</title>
    </h:head>

    <h:body>
        <div id="container">
            <div id="top">
                <ui:insert name="top">
                    <h:panelGrid columns="4" id="headerPanel" style="width: 100%" styleClass="header" border="0">
                        <h:panelGrid id="imagenPanel" style="width: 64px; height: 64px;">
                            <h:graphicImage id="imgLogo" value="/resources/img/movie.png"/>                            
                        </h:panelGrid>                                                
                        <h:panelGrid id="tituloPanel" style="width: 100%; height: 100%;" border="0">                                     
                            <h2>
                                Booking Ticket Administration
                            </h2>
                        </h:panelGrid>                        
                        <h:panelGrid>
                            <h3>
                                Cinemas, movies and showtimes
                            </h3>                            
                            <br/>
                            <ui:insert name="usuario">
                                <h:panelGrid columns="2" rendered="#{userController.loginValid}" style="float: right">
                                    <h:outputText value="User: "/>
                                    <h:form>
                                        <h:commandLink value="Logout" action="/faces/Login.xhtml" style="text-decoration: underline; color: #d7ed93">
                                            <f:setPropertyActionListener target="#{userController.loginValid}" value="false"/>
                                        </h:commandLink>                                    
                                    </h:form>
                                </h:panelGrid>
                            </ui:insert>
                        </h:panelGrid>
                    </h:panelGrid>
                </ui:insert>
            </div>
            <div>
                <div id="content" class="center_content" style="height: 380px;">
                    <ui:insert name="body">
                        <h:panelGroup rendered="#{userController.loginValid}">
                            Content
                        </h:panelGroup>
                    </ui:insert>
                </div>
            </div>
            <div id="bottom">
                <ui:insert name="bottom">
                    <div>
                    </div>
                </ui:insert>
            </div>
        </div>
    </h:body>

</html>
